import { FMAppAPI } from "./APIRequest/APICollection";
import { APIRequestType } from "./Core/FMAppAPIConstant";
import { ObjectID } from "bson";
import { GlobalVar } from "./GlobalVar";


export class APITest{
    public async loginTest():Promise<void>{
        var promise = new Promise<void>( async (callback)=>{
            var api = new FMAppAPI();
            const result = await api.login("15019432211","QA123456");
             if(result != null && result.code == 0){
                GlobalVar.Instance.LoginUser = result;
                console.log("login success");
             }
             else{
                 console.log("login not success!!!!");
             }
            callback();
        });
        return promise;
    }
}